package cn.edu.hzvtc.haowen.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.edu.hzvtc.haowen.common.annotation.Excel;
import cn.edu.hzvtc.haowen.common.core.domain.BaseEntity;

/**
 * 问卷答卷对象 wenjuan_answer
 * 
 * @author haowen
 * @date 2024-05-15
 */
public class WenjuanAnswer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 回答id */
    private Integer answerId;

    /** 回答UUID,方便在mongodb中查找 */
    @Excel(name = "回答UUID")
    private String answerUuid;

    /** 提交者ID */
    @Excel(name = "提交者ID")
    private Integer answerBy;

    /** 提交者username */
    @Excel(name = "提交者")
    private String answerUserName;

    /** 提交者nickname */
    private String answerNickName;

    /** 问卷ID */
    @Excel(name = "问卷ID")
    private Integer answerWenjuanId;

    /** 问卷UUID,mongodb中 */
    @Excel(name = "问卷UUID")
    private String answerWenjuanUuid;

    /** 问卷标题 */
    @Excel(name = "问卷标题")
    private String answerWenjuanTitle;

    /** 回答内容,json格式，同时存储在mongodb中 */
    private String answerContent;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipaddr;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setAnswerId(Integer answerId)
    {
        this.answerId = answerId;
    }

    public Integer getAnswerId() 
    {
        return answerId;
    }
    public void setAnswerUuid(String answerUuid) 
    {
        this.answerUuid = answerUuid;
    }

    public String getAnswerUuid() 
    {
        return answerUuid;
    }
    public void setAnswerBy(Integer answerBy) 
    {
        this.answerBy = answerBy;
    }

    public Integer getAnswerBy() 
    {
        return answerBy;
    }
    public void setAnswerUserName(String answerUserName) 
    {
        this.answerUserName = answerUserName;
    }

    public String getAnswerUserName() 
    {
        return answerUserName;
    }
    public void setAnswerNickName(String answerNickName) 
    {
        this.answerNickName = answerNickName;
    }

    public String getAnswerNickName() 
    {
        return answerNickName;
    }
    public void setAnswerWenjuanId(Integer answerWenjuanId) 
    {
        this.answerWenjuanId = answerWenjuanId;
    }

    public Integer getAnswerWenjuanId() 
    {
        return answerWenjuanId;
    }
    public void setAnswerWenjuanUuid(String answerWenjuanUuid) 
    {
        this.answerWenjuanUuid = answerWenjuanUuid;
    }

    public String getAnswerWenjuanUuid() 
    {
        return answerWenjuanUuid;
    }
    public void setAnswerWenjuanTitle(String answerWenjuanTitle) 
    {
        this.answerWenjuanTitle = answerWenjuanTitle;
    }

    public String getAnswerWenjuanTitle() 
    {
        return answerWenjuanTitle;
    }
    public void setAnswerContent(String answerContent) 
    {
        this.answerContent = answerContent;
    }

    public String getAnswerContent() 
    {
        return answerContent;
    }

    public void setIpaddr(String ipaddr)
    {
        this.ipaddr = ipaddr;
    }

    public String getIpaddr()
    {
        return ipaddr;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("answerId", getAnswerId())
            .append("answerUuid", getAnswerUuid())
            .append("answerBy", getAnswerBy())
            .append("answerUserName", getAnswerUserName())
            .append("answerNickName", getAnswerNickName())
            .append("answerWenjuanId", getAnswerWenjuanId())
            .append("answerWenjuanUuid", getAnswerWenjuanUuid())
            .append("answerWenjuanTitle", getAnswerWenjuanTitle())
            .append("answerContent", getAnswerContent())
            .append("createTime", getCreateTime())
            .append("ipaddr", getIpaddr())
            .toString();
    }
}
